Sync eng/common directory with azure-sdk-tools for PR 11807#6712
Merged
praveenkuttappan merged 3 commits intomainfrom Aug 22, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR synchronizes the eng/common directory with azure-sdk-tools for PR 11807, updating a PowerShell script to support processing multiple package information files from a directory instead of just a single file.
Key changes:
- Modified the
Mark-ReleasePlanCompletion.ps1script to accept either a single package info file or a directory containing multiple package info files - Refactored the main processing logic into a reusable function
- Added directory traversal to process all JSON files in the specified path
| # Get all package info file under the directory given in input param and process | ||
| Get-ChildItem -Path $PackageInfoFilePath -Filter "*.json" | ForEach-Object { | ||
| Write-Host "Processing package info file: $_" | ||
| Process-Package $_.FullName |
There was a problem hiding this comment.
The script unconditionally treats the input path as a directory and attempts to enumerate JSON files, but it should first check if the path is a file or directory. If it's a single file, it should process just that file; if it's a directory, then enumerate the JSON files. This breaks backward compatibility with existing usage that passes a single file path.
Suggested change
| Process-Package $_.FullName | |
| # If the path is a file, process just that file. If it's a directory, enumerate JSON files. | |
| if (Test-Path $PackageInfoFilePath -PathType Leaf) { | |
| Write-Host "Processing package info file: $PackageInfoFilePath" | |
| Process-Package $PackageInfoFilePath | |
| } | |
| elseif (Test-Path $PackageInfoFilePath -PathType Container) { | |
| Get-ChildItem -Path $PackageInfoFilePath -Filter "*.json" | ForEach-Object { | |
| Write-Host "Processing package info file: $_" | |
| Process-Package $_.FullName | |
| } | |
| } | |
| else { | |
| Write-Host "The path $PackageInfoFilePath is neither a valid file nor a directory." | |
| exit 1 |
praveenkuttappan
approved these changes
Aug 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#11807 See eng/common workflow